home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / mos / source / mos110.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  884 b   |  38 lines

  1.  
  2. /*
  3.  *
  4.  *    MOS110 : マウスカ-ソル形状の設定
  5.  *
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10. #include <mem.h>
  11.  
  12. unsigned int MOS_cursol_pattern(signed char cx,signed char cy,unsigned char wx,unsigned char wy,unsigned int color,unsigned char *and,unsigned char *xor) {
  13.    union  REGS  inregs, outregs;
  14.    struct SREGS segregs;
  15.    static struct {
  16.       unsigned char wx;
  17.       unsigned char wy;
  18.       unsigned int color;
  19.       unsigned char pattern[272];
  20.    } work;
  21.    unsigned int size;
  22.  
  23.    size=wx*wy/8;
  24.    work.wx=wx;
  25.    work.wy=wy;
  26.    work.color=color;
  27.    memcpy(&work.pattern,and,size);
  28.    memcpy(&work.pattern[size],xor,size);
  29.    segread(&segregs);
  30.    inregs.h.dh=cx;
  31.    inregs.h.dl=cy;
  32.    segregs.ds=_DS;
  33.    inregs.x.di=(unsigned int)&work;
  34.    inregs.x.ax=0x0900;
  35.    int86x(0x99,&inregs,&outregs,&segregs);
  36.    return (unsigned int)outregs.h.ah;
  37. }
  38.